/*
 * @Descripttion:
 * @version:
 * @Author: cxguo
 * @Date: 2019-09-08 11:11:06
 * @LastEditors: cxguo
 * @LastEditTime: 2019-12-17 15:08:30
 */
import Layout from '@/layout'
import saleChildren from './mudules/sale'
import stockChildren from './mudules/stock'
import reportChildren from './mudules/report'
import dataChildren from './mudules/data'
import setupChildren from './mudules/setup'

export default [
  {
    path: '/',
    component: Layout,
    redirect: '/dashboard',
    meta: { title: '工作台', icon: 'home' },
    children: [{
      path: 'dashboard',
      name: 'Dashboard',
      component: () => import('@/views/dashboard/index'),
      meta: { title: '工作台', icon: 'home' }
    }]
  },
  {
    path: '/sale',
    component: Layout,
    redirect: '/sale/detail',
    name: 'Sale',
    meta: { title: '销售', icon: 'sale' },
    children: saleChildren
  },
  {
    path: '/stock',
    component: Layout,
    redirect: '/store/list',
    name: 'Store',
    meta: {
      title: '库存',
      icon: 'store'
    },
    children: stockChildren
  },
  {
    path: '/report',
    component: Layout,
    redirect: '/report/list',
    name: 'Report',
    meta: {
      title: '报表',
      icon: 'report'
    },
    children: reportChildren
  },
  {
    path: '/basedata',
    component: Layout,
    redirect: '/basedata/goods',
    name: 'Basedata',
    meta: { title: '数据', icon: 'basedata' },
    children: dataChildren
  },
  {
    path: '/setup',
    component: Layout,
    redirect: '/setup/role',
    name: 'Sys',
    meta: { title: '设置', icon: 'basedata' },
    children: setupChildren
  }
]
